﻿using ProtoBuf;

namespace ToyChat
{

    /// <summary>
    /// A message used by a client to join or leave a channel
    /// </summary>
    [ProtoContract]
    public class LeavingMessage
    {
        /// <summary>
        /// Gets or Sets the ID of the user that is "leaving" the channel
        /// </summary>
        [ProtoMember(1)]
        public int UserID { get; set; }

        /// <summary>
        /// Gets or Sets the ID of the channel the user is leaving
        /// </summary>
        [ProtoMember(2)]
        public int ChannelID { get; set; }

        /// <summary>
        /// Gets or Sets the reason for leaving the channel
        /// </summary>
        [ProtoMember(3, IsRequired = false)]
        public string LeavingReason { get; set; }
    }
}